﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CinemaSystem
{
    public partial class yptj : Form
    {
        public yptj()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            string sqlstr = string.Format("insert into Movie values('6','{0}','{1}','{2}','{3}','{4}','{5}')", textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text, textBox6.Text);
            int i = DBHelper.ExecuteNonQuery(sqlstr);
            if (i > 0)
            {
                MessageBox.Show("添加成功");
                MainGLY mainGLY = new MainGLY();
                mainGLY.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("添加失败");
            }
        }
    }
}
